

#ifndef __KTVRANDLIST_H__
#define __KTVRANDLIST_H__

class CKtvSong;

#ifdef KTV_RAND_LIST_SUPPORT


	typedef struct{
		// IDX
		INT32 iSongIdx;
		//UINT32  dwSongID;
	}ktvRandListItem_t;


	class CKtvRandList:public CKtvContextWrapper{

		
	public:	
		enum{
			MAX_RAND_ITEM_CNT = 20,
		};
	public:
		CKtvRandList(CKtvContext * lpstContext);
		virtual ~CKtvRandList();

		INT32 getItemCnt();
		INT32 pop();
		ktvRandListItem_t * getItem(INT32 iIdx);
		ktvRandListItem_t * getCurItem();
		ktvRandListItem_t * getNextItem();
		#ifdef KTV_SONG_SUPPORT
		INT32 createItemsBySong(CKtvSong * lpclSong);
		#endif
		void initBySoftwareConfig();
	private:
		void deleteItems();
		INT32 createItems(INT32 iItemCnt);
	private:
		ktvRandListItem_t * m_lpstItem;
		INT32 m_iItemCnt;
		INT32 m_iMaxItemCnt;
		INT32 m_iCurItemIdx;
		
	};

#endif //#ifdef KTV_RAND_LIST_SUPPORT

#endif //#ifndef __KTVRANDLIST_H__




